package com.spddr.pmos.cxf;

import java.util.List;

import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.spddr.pmos.jpa.ReservoirLevelVolume;
import com.spddr.pmos.jpa.ReservoirLevelVolumeId;

import cn.seqdata.cxf.repos.JaxrsRepository;
import cn.seqdata.echarts.Option;

@Path("/reservoir/{reservoir}/levelvolume")
public interface JaxrsReservoirLevelVolume extends JaxrsRepository<ReservoirLevelVolume, ReservoirLevelVolumeId> {
	@GET
	@Path("/")
	List<ReservoirLevelVolume> findByReservoir(@PathParam("reservoir") long reservoir);

	@PUT
	@Path("/")
	List<ReservoirLevelVolume> saveByReservoir(@PathParam("reservoir") long reservoir,
			List<ReservoirLevelVolume> entities);

	@DELETE
	@Path("/")
	void deleteByReservoir(@PathParam("reservoir") long reservoir);

	@GET
	@Path("/chart")
	@JsonIgnore
	Option chart(@PathParam("reservoir") long reservoir);
}
